{% extends "base.html" %}

{% block content %}
<div class="auth-container container">
    <div class="card auth-card">
        <h2>注册</h2>
        <form method="POST" action="{{ url_for('auth.register') }}">
            {{ form.hidden_tag() }}
            <div class="form-group">
                {{ form.username.label }}
                {{ form.username(class="form-control") }}
                {% for error in form.username.errors %}
                <span class="error">{{ error }}</span>
                {% endfor %}
            </div>
            <div class="form-group">
                {{ form.email.label }}
                {{ form.email(class="form-control") }}
                {% for error in form.email.errors %}
                <span class="error">{{ error }}</span>
                {% endfor %}
            </div>
            <div class="form-group">
                {{ form.password.label }}
                {{ form.password(class="form-control") }}
                {% for error in form.password.errors %}
                <span class="error">{{ error }}</span>
                {% endfor %}
            </div>
            <div class="form-group">
                {{ form.password2.label }}
                {{ form.password2(class="form-control") }}
                {% for error in form.password2.errors %}
                <span class="error">{{ error }}</span>
                {% endfor %}
            </div>
            <button type="submit" class="btn">注册</button>
        </form>
        <div class="auth-links">
            <p>已有账号？<a href="{{ url_for('auth.login') }}">立即登录</a></p>
        </div>
    </div>
</div>
{% endblock %} 